<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>

    <a id = "apple">苹果手机</a>
    <button onclick = "deletefunction()">删除</button>
    <button onclick = "recoveryfunction()">恢复</button>
    <script>
        function deletefunction(){
            if(confirm("确实要删除吗？")){
                document.getElementById("apple").innerHTML = "    ";
            }
            else{

            }
        }
        function recoveryfunction(){
            document.getElementById("apple").innerHTML = "苹果手机"
        }
    </script>

</body>
</html>